import React from 'react'
import './App.css'
import './style/index.scss'
import { Routes } from './router'
import { Provider } from 'react-redux'
import store from './stroe'
let id = sessionStorage.getItem('id')
let name = sessionStorage.getItem('name')

if (id && name) {
  store.dispatch({ type: 'LOGIN_SUCCESS', payload: { id: id, username: name } })
}
function App() {
  return (
    <Provider store={store}>
      <div className="App">
        <Routes />
      </div>
    </Provider>
  )
}

export default App
